export default {
    route(url, params, handle, type) {
		let urlObj = {url: url, params: params}
		if (type) {
			urlObj.type = type
		}
        uni.$u.route(urlObj);
		if (handle) {
			handle();
		}
    },
	
	routeRedirect(url, params) {
		this.route(url, params, null, 'redirect')
	},
	
	reLaunchIndex() {
		uni.reLaunch({url: '/pages/index/index'})
	}

}
